﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
   <title>${product.title}</title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/admin/css/pintuer.css">
    <script src="<%=request.getContextPath()%>/admin/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/admin/js/pintuer.js"></script>
    <script src="<%=request.getContextPath()%>/admin/js/admin.js"></script>

  <style>
img{ height: auto; width: auto\9; width:100%; } 
   body{
    background-color:#F2F2F2;}
</style>
<style type="text/css">
	     table{border: 1px solid #DCDCDC;border-top: 1px solid #DCDCDC;}
         td{border:1px solid #DCDCDC;}
         td{text-align:center;
            vertical-align:middle;
            height:30px;
         }
	</style>
  </head>
  
  
  <body>
   <s:if test="msg=='添加成功'">
  <script >alert("添加购物车成功")</script>
   </s:if> 
   
   <s:if test="msg=='添加失败'">
  <script >alert("添加失败")</script>
   </s:if> 
   
    <s:if test="msg=='该商品已存在于购物车'">
  <script >alert("该商品已存在于购物车")</script>
   </s:if> 
<!-- 显示服装类的规格和规格值 -->
 <div>
 <div id="bbb" class="closeclose" style="display:none;opacity:0.50;position:fixed;background:#696969;z-index:9999;width:100%;height:100%"></div>
 <div id="ccc0" class="closeclose" style="display:none;opacity:1.0;position:fixed;bottom:0px;left:0%;z-index:10000;background:#fff;height:400px;width:100%;">
      <input id="productbianma" type="hidden" value="${product.bianma}"/>
      <input id="productid0" type="hidden" value="${product.id }"/>
      <div style="height:100px;">
           <div style="height:100px;float:left;width:43%;background:;">
                <div style="border-radius:5%;height:102px;width:80%;margin-left:10%;background:#fff;border:1px solid #f5f5f5;margin-top:-10px;">
                <img style="margin-top:1px;margin-left:1%;width:98%;height:98px;" alt="" src="<%=request.getContextPath() %>/${product.img}">
                </div>
           </div>
           <div style="height:100px;float:left;width:50%;background:#;">
                <div style="margin-top:10px;line-height:25px;font-size:16px;color:#ff6600;">￥<span id="pprice">${product.price }</span></div>
                <div style="line-height:25px;font-size:13px;">库存<span id="stocknum0">${product.stocknum}</span>件</div>
                <div id="haschoose" style="line-height:25px;font-size:13px;">
                <s:if test="guigenum==1">
                请选择&nbsp;${guige01.name }
                </s:if>
                <s:elseif test="guigenum==2">
                请选择&nbsp;${guige01.name }&nbsp;${guige02.name }
                </s:elseif>
                <s:else>
              请选择&nbsp;${guige01.name }&nbsp;${guige02.name }&nbsp;${guige03.name } 
                </s:else>
                </div>
           </div>
           <div style="height:100px;float:left;width:6%;">
                <div style="height:7px;"></div>
                <a onclick="close0();"><div style="margin-left:;margin-top:0px;line-height:18px;font-size:18px;text-align:center;border:1px solid gray;border-radius:55%;">×</div></a>
           </div>
      </div>
      <div style="clear:both;height:px;">
           <div style="margin-left:5%;margin-top:5px;">
                <div id="guige01" style="font-weight:bold;">${guige01.name }</div>
                <div style="">
                    <c:forEach var="o" items="${guige1}">
                     <a onclick="chooseg(this,0);"><div class="colorcolor" id="color" style="margin-top:5px;text-align:center;border-radius:20%;width:18%;float:left;background:#dcdcdc;">
                              ${o}
                     </div></a>
                     <div style="margin-top:5px;height:20px;float:left;width:3%;background:#;"></div>
                   </c:forEach>
                 </div>
           </div>
           <input type="hidden" id="colorval" name="" value="0"/>
           <div style="clear:both;height:13px;background:#;"></div>
           <div style="clear:both;height:1px;background:#dcdcdc;"></div>
           
           <s:if test="guige02!=null">
           <div style="clear:both;margin-left:5%;margin-top:5px;">
                <div id="guige02" style="font-weight:bold;">${guige02.name }</div>
                <div style="">
                   <c:forEach var="o" items="${guige2}">
                     <a onclick="chooseg(this,1);"><div class="sizesize" style="margin-top:5px;text-align:center;border-radius:20%;width:18%;float:left;background:#dcdcdc;">
                                                       ${o }
                     </div></a>
                     <div style="margin-top:5px;height:20px;float:left;width:3%;background:#;"></div>
                   </c:forEach>
                     
                 </div>
           </div>
           <input type="hidden" id="sizeval" name="" value="0"/>
           <div style="clear:both;height:13px;background:#;"></div>
           <div style="clear:both;height:1px;background:#dcdcdc;"></div>
           </s:if>
           
           <s:if test="guige03!=null">
           <div style="clear:both;margin-left:5%;margin-top:5px;">
                <div id="guige03" style="font-weight:bold;">${guige03.name }</div>
                <div style="">
                   <c:forEach var="o" items="${guige3}">
                     <a onclick="chooseg(this,3);"><div class="otherother" style="margin-top:5px;text-align:center;border-radius:20%;width:18%;float:left;background:#dcdcdc;">
                                                       ${o }
                     </div></a>
                     <div style="margin-top:5px;height:20px;float:left;width:3%;background:#;"></div>
                   </c:forEach>
                 </div>
           </div>
           <input type="hidden" id="otherval" name="" value="0"/>
           <div style="clear:both;height:13px;background:#;"></div>
           <div style="clear:both;height:1px;background:#dcdcdc;"></div>
           </s:if>
           
           <div style="clear:both;margin-left:5%;margin-top:5px;">
                <div style="width:55%;float:left;font-weight:bold;margin-top:5px;">购买数量</div>
                <div style="margin-top:5px;width:40%;float:left;">
                    <a onclick="decrease(1); "><div style="float:left;font-size:35px;text-align:center;width:30%;border-radius:10%;background:#d3d3d3;height:30px;line-height:30px;">-</div></a>
                    <div style="text-align:center;margin-top:0px;margin-left:1%;float:left;width:20%;line-height:30px;height:30px;">
                        <span id="span1">1</span>
                    </div>
                    <a onclick="add(1);"><div style="float:left;font-size:24px;text-align:center;width:30%;border-radius:10%;background:#d3d3d3;height:30px;line-height:30px;">+</div></a>
                </div>
           </div>
           <div style="clear:both;height:13px;background:#;"></div>
           <div style="clear:both;height:1px;background:#dcdcdc;"></div>
      
      </div>
      <div id="tijiao" style="width:100%;position:fixed;bottom:0px;clear:both;text-align:center;">
           
      </div>
      <input id="guigenum" type="hidden" value="${guigenum }"/>
      <input id="stocknum" type="hidden" value=""/>
 </div>
 <script type="text/javascript">
       function bb(){
       var aaa = "哈哈哈";
       alert(aaa);
       }
       //多规格加入购物车（比如服装）
       function addCartc(id){
                    var number = document.getElementById("span1").innerHTML;
                    var guigenum = $('#guigenum').val();
                    var number = $("#span1").html();
                    //alert(number);
                    var priceval = $('#priceval').val();
                    document.getElementById("cart.num").value=number;
                    document.getElementById("cart.pid").value=id;
                    document.getElementById("productprice").value=priceval;
                    document.getElementById("jilubianma").value=jilubianma;
					if(guigenum==1){
					   var colorval = $('#colorval').val().trim();
					   $('#guige1value').val(colorval);
					   var jilubianma = colorval;
					   document.getElementById("jilubianma").value=jilubianma;
					   if(colorval!=0){
					      document.form.submit();
					   }else{
					      alert("请选择商品规格！");
					   }
					}else if(guigenum==2){
					   var colorval = $('#colorval').val().trim();
					   $('#guige1value').val(colorval);
					   //alert($('#guige1value').val());
					   var sizeval = $('#sizeval').val().trim();
					   $('#guige2value').val(sizeval);
					   //alert($('#guige2value').val());
					   var jilubianma = colorval+sizeval;
					   document.getElementById("jilubianma").value=jilubianma;
					   if(colorval!=0 && sizeval!=0){
					      document.form.submit();
					   }else{
					      alert("请选择商品规格！");
					   }
					   
					}else{
					   var colorval = $('#colorval').val().trim();
					   $('#guige1value').val(colorval);
					   var sizeval = $('#sizeval').val().trim();
					   $('#guige2value').val(sizeval);
					   var otherval = $('#otherval').val().trim();
					   $('#guige3value').val(otherval);
					   
					   var jilubianma = colorval+sizeval+otherval;
					   document.getElementById("jilubianma").value=jilubianma;
					   if(colorval!=0 && sizeval!=0 && otherval!=0){
					     document.form.submit();
					   }else{
					     alert("请选择商品规格！");
					   }
					}
		       } 
     //彈出選擇規格
  function aa(num){
	//alert(num);
	document.getElementById("bbb").style.display="";
	document.getElementById("ccc0").style.display="";
	$('#tijiao').empty();
	var pid = $('#productid0').val();
	//alert(pid);
	if(num==0){
	   //選規格-直接購買
	   $('#tijiao').append('<button onclick="buyc('
	    +pid
	    +');" class="button bg-dot" style="border-radius:0%;width:100%;">确定</button>'
	    );
	}else{
	   //選規格-添加購物車
	   $('#tijiao').append('<button onclick="addCartc('
	    +pid
	    +');" class="button bg-dot" style="border-radius:0%;width:100%;">确定</button>'
	   );
	}
  }
  //关闭
  function close0(){
    document.getElementById("bbb").style.display="none";
	document.getElementById("ccc0").style.display="none";
  }
 //点击确定
  function buyc(id){
		//alert(id);
		var guigenum = $('#guigenum').val();
		var number = document.getElementById("span1").innerHTML;
		document.getElementById("numm").value=number;
		document.getElementById("idd").value=id;
		if(guigenum==1){
		   var color = $('#colorval').val().trim();
		   var jilubianma = color;
		   $('#jilubianma0').val(jilubianma);
		   if(color!=0){
		      document.form1.submit();
		   }else{
		      alert("请选择商品属性！");
		   }
		}else if(guigenum==2){
		   var color = $('#colorval').val().trim();
           var size = $('#sizeval').val().trim();
           var jilubianma = color+size;
           $('#jilubianma0').val(jilubianma);
           if(color!=0 && size!=0){
              //alert($('#jilubianma').val());
		      document.form1.submit(); 
           }else{
              alert("请选择商品规格！");
           }
		}else{
		   var color = $('#colorval').val().trim();
           var size = $('#sizeval').val().trim();
           var other = $('#otherval').val().trim();
           var jilubianma = color+size;
           $('#jilubianma0').val(jilubianma);
           if(color!=0 && size!=0 && other!=0){
              document.form1.submit();
           }else{
              alert("请选择商品规格！");
           }
		}
   }
   
  function chooseg(obj,num){
  //alert(num);
    if(num==0){
      var colordivs = $('.colorcolor');
      //alert(obj.childNodes[0].innerHTML);
      for(var i=0;i<colordivs.length;i++){
          colordivs[i].style.background="#dcdcdc";
      }
      $('#colorval').val(obj.childNodes[0].innerHTML);
    }else if(num==1){
      var sizedivs = $('.sizesize');
      for(var i=0;i<sizedivs.length;i++){
          sizedivs[i].style.background="#dcdcdc";
      }
      $('#sizeval').val(obj.childNodes[0].innerHTML);
    }else{
    //alert("000");
      var otherdivs = $('.otherother');
      for(var i=0;i<otherdivs.length;i++){
          otherdivs[i].style.background="#dcdcdc";
      }
      $('#otherval').val(obj.childNodes[0].innerHTML);
    }
    //alert("000");
    var guigenum = $('#guigenum').val();
    
    obj.childNodes[0].style.background="#ff6600";//选中颜色变化
    //alert(guigenum);
    var bianma = $('#productbianma').val();
    if(guigenum==1){
	       var guige01 = $('#guige01').html();
	       var color = $('#colorval').val().trim();
	       var jilubianma = color;
	       $('#haschoose').html("已选："+color);
	       if(color!=0){
	       //alert("send");
	       $('#jilubianma').val(jilubianma);
	       $.ajax({
						'url':'product!findkucun.action',
						'type':'post',
						'data':{'pstore.bianma':bianma,'pstore.jilubianma':jilubianma},
						'dataType':'json',
						'success':function(data){
						//data是服务器返回的数据
						//alert(data.stocknum);
							$('#stocknum0').html(data.stocknum);
							$('#pprice').html(data.price);
							//判断一下目前的数量,如果大于库存,则强行改变
							var nowNum = $('#span1').html()*1;
							if(nowNum>data.stocknum){
								$('#span1').html(data.stocknum);
							}
							//更新当前库存
							$('#stocknum').val(data.stocknum);
								
						},
						'error':function(){
						    alert("请求失败！");
						}
					});
			}else{
				$('#haschoose').html("请您选择！"+guige01+"!"); 	
			}
    }else if(guigenum==2){
	       var guige01 = $('#guige01').html();
	       var guige02 = $('#guige02').html();
	       var color = $('#colorval').val().trim();
	       var size = $('#sizeval').val().trim();
	       var jilubianma = color+size;
	       //alert(color);alert(size);
	       if(color!=0 && size!=0){
	       $('#jilubianma').val(jilubianma);
	       $('#haschoose').html("已选："+color+"&nbsp;"+size);
	       $.ajax({
						'url':'product!findkucun.action',
						'type':'post',
						'data':{'pstore.bianma':bianma,'pstore.jilubianma':jilubianma},
						'dataType':'json',
						'success':function(data){
						//data是服务器返回的数据
						//alert(data.stocknum);
							$('#stocknum0').html(data.stocknum);
							$('#pprice').html(data.price);
							//判断一下目前的数量,如果大于库存,则强行改变
							var nowNum = $('#span1').html()*1;
							if(nowNum>data.stocknum){
								$('#span1').html(data.stocknum);
							}
							//更新当前库存
							$('#stocknum').val(data.stocknum);
						},
						'error':function(){
						    alert("请求失败！");
						}
					});
	       }else if(color!=0 && size==0){
	          $('#haschoose').html("请您选择&nbsp;"+guige02+"!");
	       }else if(color==0 && size!=0){
	          $('#haschoose').html("请您选择&nbsp;"+guige01+"!");
	       }
       
    }else{
	       var guige01 = $('#guige01').html();
	       var guige02 = $('#guige02').html();
	       var guige03 = $('#guige03').html();
	       var color = $('#colorval').val().trim();
	       var size = $('#sizeval').val().trim();
	       var other = $('#otherval').val().trim();
	       var jilubianma = color+size+other;
	       //alert(color);alert(size);alert(other);
	       if(color!=0 && size!=0 && other!=0){
	       $('#jilubianma').val(jilubianma);
	       $('#haschoose').html("已选："+color+"&nbsp;"+size+"&nbsp;"+other);
	       //alert("send");
	       $.ajax({
						'url':'product!findkucun.action',
						'type':'post',
						'data':{'pstore.bianma':bianma,'pstore.jilubianma':jilubianma},
						'dataType':'json',
						'success':function(data){
						//data是服务器返回的数据
						//alert("9999");
						//alert(data.stocknum);
							$('#stocknum0').html(data.stocknum);
							$('#pprice').html(data.price);
							//判断一下目前的数量,如果大于库存,则强行改变
							var nowNum = $('#span1').html()*1;
							if(nowNum>data.stocknum){
								$('#span1').html(data.stocknum);
							}
							//更新当前库存
							$('#stocknum').val(data.stocknum);
						},
						'error':function(){
						    alert("请求失败！");
						}
					});
	       }else if(color!=0 && size==0 && other==0){
	                //只选第一个
	                //alert("01");
	                $('#haschoose').html("请您选择&nbsp;"+guige02+"&nbsp;和&nbsp;"+guige03+"!");
	       }else if(color==0 && size!=0 && other==0){
	                //只选第二个
	                //alert("02");
	                $('#haschoose').html("请您选择&nbsp;"+guige01+"&nbsp;和&nbsp;"+guige03+"!");
	       }else if(color==0 && size==0 && other!=0){
	                //只选第三个
	                //alert("01");
	                $('#haschoose').html("请您选择&nbsp;"+guige01+"&nbsp;和&nbsp;"+guige02+"!");
	       }else if(color!=0 && size!=0 && other==0){
	                //选前两个
	                //alert("03");
	                $('#haschoose').html("请您选择&nbsp;"+guige03+"!");
	       }else if(color!=0 && size==0 && other!=0){
	                //选前一三
	                //alert("04");
	                $('#haschoose').html("请您选择&nbsp;"+guige02+"!");
	       }else{
	                //选二三
	                //alert("05");
	                $('#haschoose').html("请您选择&nbsp;"+guige01+"!");
	       }
       
    }
  
  }
  
 </script>
 
 </div>
 
<img src="<%=request.getContextPath()%>/${product.img}" width="100%" height="170" class="radius-small" />
   <h3  style="margin-top:5px;text-align:center;">${product.title }</h3> 
   <div style="width:100%;height:1px;background:gray;"></div>
   <div style="width:40%;">
          <div style="margin-left:15%;height:20px;line-height:20px;font-size:16px;">价格:<span style="color:red;">￥${product.price}</span></div>
          <input id="priceval" type="hidden" value="${product.price}"/>
                    
   </div>
   <div style="width:60%;">
        <div style="margin-top:8px;margin-left:10%;float:left;width:25%;line-height:30px;height:30px;"><h4>数量:</h4></div>
        <div style="margin-top:8px;float:left;width:20%;line-height:30px;height:30px;">
           <button style="width:100%;" type="button" class="button button-small" onclick="decrease(0);">
               <h2><strong>-</strong></h2>
           </button>
        </div>
        <div style="margin-top:8px;margin-left:1%;float:left;width:20%;line-height:30px;height:30px;">
             <input  style="height:30px;width:100%;" name="num" type="text" id="text" class="input input-small"  value="1"/>
        </div>
        <div style="margin-top:8px;margin-left:1%;float:left;width:20%;line-height:30px;height:30px;">
           <button style="width:100%;" type="button" class="button button-small" onclick="add(0);">
               <h2>+</h2>
           </button>
        </div>
   </div> 
   <div style="clear:both;width:100%;height:20px;background:;"></div>
   
   <s:if test="product.specification==1">
      <a href="javascript:void(0);" onclick="aa(1);"><div style="text-align:center;"><button class="button bg-red" style="width:80%;">加入购物车</button></div></a>
   </s:if>
   <s:else>
   <a href="javascript:void(0);" onclick="addCart(${product.id});return false;"> 
 <div  class="fixed"   style="clear:both;margin-top:px;text-align:center; width:100%;"  data-style="fixed-top" ><button class="button bg-red" style="width:80%;">加入购物车</button></div>
  </a>
   </s:else>
   
  <br/>

  <s:if test="product.specification==1">
  <a href="javascript:void(0);" onclick=" aa(0);"><div style="text-align:center;"><button class="button bg-dot" style="width:80%;">直接购买</button></div></a>
  </s:if>
  <s:else>
  <a href="javascript:void(0);" onclick="buy(${product.id})"><div style="text-align:center;"><button class="button bg-dot" style="width:80%;">直接购买</button></div></a>
  </s:else><br/>

  <div style="height:35px;width:100%;background:#ECF0F3;">
     <a onclick="qiehuan(0);"><div style="width:50%;float:left;">  
       <div id="tuwen0" style="line-height:35px;text-align:center;color:#E47606;">图文详情</div>
       <div id="tuwen1" style="width:100%;height:1px;background:#E47606;"></div>
     </div></a>
     <a onclick="qiehuan(1);"><div style="width:50%;float:left;">
          <div id="shuxing0" style="line-height:35px;text-align:center;color:;">产品属性</div>
          <div id="shuxing1" style="width:100%;height:1px;background:;"></div>
     </div></a>
 </div> 
 <script type="text/javascript">
       function qiehuan(type){
           if(type==0){
               $('#shuxing').css('display','none');
             $('#shuxing0').css('color','#000');
             $('#shuxing1').css('background','');
             
             $('#tuwen').css('display','');
             $('#tuwen0').css('color','#E47606');
             $('#tuwen1').css('background','#E47606');
             
           }else{
           
             $('#shuxing').css('display','');
             $('#shuxing0').css('color','#E47606');
             $('#shuxing1').css('background','#E47606');
             
             $('#tuwen').css('display','none');
             $('#tuwen0').css('color','#000');
             $('#tuwen1').css('background','');
           }
           //alert();
       }  
 </script>
<!-- 产品属性 -->
  <div style="clear:both;height:0px;"></div>
  <div id="shuxing" style="clear:both;display:none">
       <table style="margin-top:15px;margin-left:2%;" rules="all" id="viewTabs" width="94%" border="0" cellspacing="0" cellpadding="0" style="background:#F5F5F5;">
             <s:iterator value="pattrsaves">
                 <tr><td><s:property value="attr"/></td><td><s:property value="value"/></td></tr>
             </s:iterator>
       </table>
  </div>
 <div id="tuwen" style="width:100%;display:;">
      ${product.content}
 </div></br></br></br></br></br>
<!-- 以下提交加入购物车 -->
<form name="form" action="<%=request.getContextPath()%>/w/cart!add.action" method="post">
				<input id="cart.pid" name="order0.pid" type="hidden"/>
				<input id="cart.num" name="order0.num" type="hidden"/>
				<input id="productprice" name="cart.price" type="hidden"/>
				<input name="order0.guige1value" id="guige1value" value=""  type="hidden"/>
				<input name="order0.guige2value" id="guige2value" value=""  type="hidden"/>
				<input name="order0.guige3value" id="guige3value" value=""  type="hidden"/>
				<input id="jilubianma" name="order0.jilubianma" type="hidden" value="0"/>
				<input type="hidden" name="team.openid" value="${team.openid }"/>
				</form>
				
<!-- 以下是提交直接购买 -->
<form name="form1" action="<%=request.getContextPath()%>/w/cart!buy.action" method="post">
				<input id="idd" name="order0.pid" value="" type="hidden"/>
				<input id="numm" name="order0.num" value=""  type="hidden"/>
				<input type="hidden" name="team.id" value="${team.id }"/>
				<input type="hidden" name="product.bianma" value="${product.bianma}"/>
				<input id="jilubianma0" name="order0.jilubianma" value="0" type="hidden"/>
				<input name="product.specification" value="${product.specification}" type="hidden"/>
				<input type="hidden" name="team.openid" value="${team.openid }"/>
				</form>
				
<script type="text/javascript">
       //其他类添加到购物车
		function addCart(id){
					$('#productprice').val($('#priceval').val());
					//alert($('#productprice').val());
					var number = document.getElementById("text").value;
					document.getElementById("cart.num").value=number;
					document.getElementById("cart.pid").value=id;
					document.form.submit(); 
				}
				
		function buy(id){
	    //alert(id);
				    var number = document.getElementById("text").value;
					document.getElementById("numm").value=number;
					document.getElementById("idd").value=id;
					
					document.form1.submit(); 
				}

</script>
<script type="text/javascript">
 function decrease(a){
    //alert("减");
    if(a==1){
    //alert("减0");
	    var num=document.getElementById("span1").innerHTML;
	     //alert(num);
		if(num<=1){
			document.getElementById("span1").innerHTML=1;
		}else{
			num=num*1-1;
			document.getElementById("span1").innerHTML=num;
		}
	
    }else{
	    var num=document.getElementById("text").value;
		if(num<=1){
			document.getElementById("text").value=1;
		}else{
		num=num*1-1;
			document.getElementById("text").value=num;
		}
    }
	
	
	//计算	
}
//增加购物数量
function add(a){
	//var nodes = btnObj.parentNode.childNodes;
//alert("加");
    if(a==1){
    	var stocknum = $('#stocknum').val();
    	if(stocknum==""){
    		stocknum = 100000;
        }
	    var num=document.getElementById("span1").innerHTML;
		if(num<1){
			document.getElementById("span1").innerHTML=1;
		}else if(num<stocknum){
			num=num*1+1;
			document.getElementById("span1").innerHTML=num;
		}
    }else{
		var num=document.getElementById("text").value;
		if(num<1){
			document.getElementById("text").value=1;
		}else{
			num=num*1+1;
			document.getElementById("text").value=num;
		}
    }
}
</script>				  

 <a href="<%=path %>/w/cart!mycart.action">
  <div style="position:fixed;width:10%;height:40px;right:10px;bottom:100px;text-align:center;line-height:40px;color:white;">
 <span class="icon-shopping-cart text-large text-gray"></span>
 </div></a>
 
  

  <a href="javascript:scroll(0,0)">
  <div style="position:fixed;width:10%;height:40px;right:10px;bottom:60px;text-align:center;line-height:40px;color:white;">
 <button class="button button-little radius-rounded"> <span class="icon-arrow-up text-gray"></span></button>
 </div>
 </a>


<!--底部菜单开始-->
<s:include value="/w/tmpfoot.jsp"></s:include>

</body>
  
</html>